<script setup>
import CycleItem from './CycleItem.vue';
const props = defineProps({
  data: {type: Object, required: true},
  floor: {type: Number}
});
</script>

<template>
    <div v-for="(item, index) in props.data" :key="index" class="cycle-item">
        {{ floor }}-{{ index + 1 }}
        <CycleItem v-if="item.children" :data="item.children" :floor="props.floor+1" />
    </div>
</template>

<style scoped>
.cycle-item{
    padding: 10px 5px 5px 5px; border: 1px solid red;
    font-size: 16px; line-height: 24px;
}
</style>
